﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Entity
{
    public class Config
    {
        #region[Public Properties]
        public string Id { get; set; }
        public string Mail_Smtp { get; set; }
        public string Mail_Port { get; set; }
        public string Mail_Info { get; set; }
        public string Mail_Noreply { get; set;}
        public string Mail_Password { get; set; }
        public string PlaceHead { get; set; }
        public string PlaceBody { get; set; }
        public string GoogleId { get; set; }
        public string Contact { get; set; }
        public string Copyright { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string Keyword { get; set;}
        public string Lang { get; set; }
        #endregion
        #region[ConfigIDataReader]
        public static Config ConfigIDataReader(IDataReader dr)
        {
            var obj = new Config
                          {
                              Id = Convert.ToString(dr["Id"]),
                              Mail_Smtp = Convert.ToString(dr["Mail_Smtp"]),
                              Mail_Port = Convert.ToString(dr["Mail_Port"]),
                              Mail_Info = Convert.ToString(dr["Mail_Info"]),
                              Mail_Noreply = Convert.ToString(dr["Mail_Noreply"]),
                              Mail_Password = Convert.ToString(dr["Mail_Password"]),
                              PlaceHead = Convert.ToString(dr["PlaceHead"]),
                              PlaceBody = Convert.ToString(dr["PlaceBody"]),
                              GoogleId = Convert.ToString(dr["GoogleId"]),
                              Contact = Convert.ToString(dr["Contact"]),
                              Copyright = Convert.ToString(dr["Copyright"]),
                              Title = Convert.ToString(dr["Title"]),
                              Description = Convert.ToString(dr["Description"]),
                              Keyword = Convert.ToString(dr["Keyword"]),
                              Lang = Convert.ToString(dr["Lang"])


                          };
            return obj;
        }
        #endregion
    }
}
